package com.yachtar.property.db;

import android.content.ContentValues;
import android.database.Cursor;

/**
 * ¥����Ϣ��
 * 
 * @author Administrator
 * 
 */
public class TUseBuild implements IBean {
	/**
	 * ��Ӧ����
	 */
	public final static String T_Name = "v_Fund_UseBuild_ForVote";
	/**
	 * ��Ŀ���---����Ŀ�����
	 */
	public final static String C_SERIALNO = "SERIALNO";
	/**
	 * ¥�����
	 */
	public final static String C_BUILDINGID = "BUILDINGID";
	/**
	 * ¥������
	 */
	public final static String C_BUILDINGNAME = "BUILDINGNAME";

	public final static String[] tUseBuildCols = new String[] {
			TUseBuild.C_BUILDINGID, TUseBuild.C_BUILDINGNAME,
			TUseBuild.C_SERIALNO };;

	/**
	 * ��Ŀ���---����Ŀ�����
	 */
	private String serialNO;
	/**
	 * ¥�����
	 */
	private String buildingId;
	/**
	 * ¥������
	 */
	private String buildingName;

	public String getSerialNO() {
		return serialNO;
	}

	public void setSerialNO(String serialNO) {
		this.serialNO = serialNO;
	}

	public String getBuildingId() {
		return buildingId;
	}

	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	public String getBuildingName() {
		return buildingName;
	}

	public void setBuildingName(String buildingName) {
		this.buildingName = buildingName;
	}

	public void loadData(Cursor c) {
		if (c != null &&!c.isAfterLast()) {
			this.buildingId = c.getString(c.getColumnIndex(C_BUILDINGID));
			this.buildingName = c.getString(c.getColumnIndex(C_BUILDINGNAME));
			this.serialNO = c.getString(c.getColumnIndex(C_SERIALNO));
		}
	}

	public ContentValues createContentValues() {
		ContentValues values = new ContentValues();
		values.put(C_BUILDINGID, this.buildingId);
		values.put(C_BUILDINGNAME, this.buildingName);
		values.put(C_SERIALNO, this.serialNO);
		return values;
	}

	@Override
	public void clearData() {
		// TODO Auto-generated method stub
		this.buildingId = null;
		this.buildingName = null;
		this.serialNO = null;
	}

}
